clear 
set more off
cd "/Users/yasenov/Dropbox/mariel_boatlift/jhr_version/jhr_figures"
global folder /Users/yasenov/Dropbox/mariel_boatlift/revision_version/revision_data/
set scheme s1color

* H - hispanic, NH - non-hispanic
* M - male; F - female
* P - prime age; M - marginal age

*** 1. H, M, P, March CPS 
use $folder/aux_may-org.dta, clear 
keep if age >= 19

keep if age >= 25 & age <= 59
keep if cuban == 0 & hisp == 1
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_m_p_size = samplesize
rename loguearnhre h_m_p
tempfile h_m_p 
save `h_m_p'
/*			*/

*** 2. H, M, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19

keep if age <= 25 | age >= 59
keep if cuban == 0 & hisp == 1
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)

count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_m_m_size = samplesize
rename loguearnhre h_m_m
tempfile h_m_m 
save `h_m_m'
/*			*/

*** 3. H, M, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if cuban == 0 & hisp == 1
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_m_mp_size = samplesize
rename loguearnhre h_m_mp
tempfile h_m_mp 
save `h_m_mp'
/*			*/

*** 4. H, F, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if cuban == 0 & hisp == 1
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_f_p_size = samplesize
rename loguearnhre h_f_p
tempfile h_f_p 
save `h_f_p'
/*			*/

*** 5. H, F, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if cuban == 0 & hisp == 1
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_f_m_size = samplesize
rename loguearnhre h_f_m
tempfile h_f_m
save `h_f_m'
/*			*/

*** 6. H, F, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if cuban == 0 & hisp == 1
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_f_mp_size = samplesize
rename loguearnhre h_f_mp
tempfile h_f_mp
save `h_f_mp'
/*			*/

*** 7. H, FM, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if cuban == 0 & hisp == 1
keep if male == 1 | male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_fm_p_size = samplesize
rename loguearnhre h_fm_p
tempfile h_fm_p 
save `h_fm_p'
/*			*/

*** 8. H, FM, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if cuban == 0 & hisp == 1
keep if male == 1 | male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_fm_m_size = samplesize
rename loguearnhre h_fm_m
tempfile h_fm_m 
save `h_fm_m'
/*			*/

*** 9. H, FM, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if cuban == 0 & hisp == 1
keep if male == 0 | male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen h_fm_mp_size = samplesize
rename loguearnhre h_fm_mp
tempfile h_fm_mp
save `h_fm_mp'
/*			*/

*** 10. NH, M, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if hisp == 0 & cuban == 0
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_m_p_size = samplesize
rename loguearnhre nh_m_p
tempfile nh_m_p 
save `nh_m_p'
/*			*/

*** 11. NH, M, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if hisp == 0 & cuban == 0
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_m_m_size = samplesize
rename loguearnhre nh_m_m
tempfile nh_m_m 
save `nh_m_m'
/*			*/

*** 12. NH, M, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if hisp == 0 & cuban == 0
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_m_mp_size = samplesize
rename loguearnhre nh_m_mp
tempfile nh_m_mp 
save `nh_m_mp'
/*			*/

*** 13. NH, F, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if hisp == 0 & cuban == 0
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_f_p_size = samplesize
rename loguearnhre nh_f_p
tempfile nh_f_p 
save `nh_f_p'
/*			*/

*** 14. NH, F, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if hisp == 0 & cuban == 0
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_f_m_size = samplesize
rename loguearnhre nh_f_m
tempfile nh_f_m
save `nh_f_m'
/*			*/

*** 15. NH, F, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if hisp == 0 & cuban == 0
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_f_mp_size = samplesize
rename loguearnhre nh_f_mp
tempfile nh_f_mp
save `nh_f_mp'
/*			*/

*** 16. NH, FM, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if hisp == 0 & cuban == 0
keep if male == 1 | male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_fm_p_size = samplesize
rename loguearnhre nh_fm_p
tempfile nh_fm_p 
save `nh_fm_p'
/*			*/

*** 17. NH, FM, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if hisp == 0 & cuban == 0
keep if male == 1 | male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_fm_m_size = samplesize
rename loguearnhre nh_fm_m
tempfile nh_fm_m 
save `nh_fm_m'
/*			*/

*** 18. NH, FM, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if hisp == 0 & cuban == 0
keep if male == 0 | male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen nh_fm_mp_size = samplesize
rename loguearnhre nh_fm_mp
tempfile nh_fm_mp
save `nh_fm_mp'
/*			*/

*** 19. HNH M, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if cuban == 0
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_m_p_size = samplesize
rename loguearnhre hnh_m_p
tempfile hnh_m_p 
save `hnh_m_p'
/*			*/

*** 20. HNH M, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if cuban == 0
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_m_m_size = samplesize
rename loguearnhre hnh_m_m
tempfile hnh_m_m 
save `hnh_m_m'
/*			*/

*** 21. HNH M, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if cuban == 0
keep if male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_m_mp_size = samplesize
rename loguearnhre hnh_m_mp
tempfile hnh_m_mp 
save `hnh_m_mp'
/*			*/

*** 22. HNH F, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if cuban == 0
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_f_p_size = samplesize
rename loguearnhre hnh_f_p
tempfile hnh_f_p 
save `hnh_f_p'
/*			*/

*** 23. HNH F, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if cuban == 0
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_f_m_size = samplesize
rename loguearnhre hnh_f_m
tempfile hnh_f_m
save `hnh_f_m'
/*			*/

*** 24. HNH F, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if cuban == 0
keep if male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_f_mp_size = samplesize
rename loguearnhre hnh_f_mp
tempfile hnh_f_mp
save `hnh_f_mp'
/*			*/

*** 25. HNH FM, P, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 25 & age <= 59
keep if cuban == 0
keep if male == 1 | male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_fm_p_size = samplesize
rename loguearnhre hnh_fm_p
tempfile hnh_fm_p 
save `hnh_fm_p'
/*			*/

*** 26. HNH FM, M, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age <= 25 | age >= 59
keep if cuban == 0
keep if male == 1 | male == 0

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_fm_m_size = samplesize
rename loguearnhre hnh_fm_m
tempfile hnh_fm_m 
save `hnh_fm_m'
/*			*/

*** 27. HNH FM, MP, March CPS 
use $folder/aux_may-org.dta, clear
keep if age >= 19


keep if age >= 19 & age <= 65
keep if cuban == 0
keep if male == 0 | male == 1

keep if low_skilled == 1 & loguearnhre > 0 & (classer == 1 | classer == 2 ) & smsa == 26
drop if (ftpt79 == 0 & year <= 1988) | (ftpt89 ==1 & year > 1988)


count if year >= 1978 & year <= 1982
scalar samplesize = r(N) / 5

collapse (mean) loguearnhre [pw=earnwt], by(year)
gen hnh_fm_mp_size = samplesize
rename loguearnhre hnh_fm_mp
tempfile hnh_fm_mp
save `hnh_fm_mp'
/*			*/

*********************
*********************
*********************
*********************
clear
use `h_m_p'
merge 1:1 year using `h_m_m', nogen
merge 1:1 year using `h_m_mp', nogen
merge 1:1 year using `h_f_m', nogen
merge 1:1 year using `h_f_p', nogen
merge 1:1 year using `h_f_mp', nogen
merge 1:1 year using `h_fm_m', nogen
merge 1:1 year using `h_fm_p', nogen
merge 1:1 year using `h_fm_mp', nogen
merge 1:1 year using `nh_m_p', nogen
merge 1:1 year using `nh_m_m', nogen
merge 1:1 year using `nh_m_mp', nogen
merge 1:1 year using `nh_f_m', nogen
merge 1:1 year using `nh_f_p', nogen
merge 1:1 year using `nh_f_mp', nogen
merge 1:1 year using `nh_fm_m', nogen
merge 1:1 year using `nh_fm_p', nogen
merge 1:1 year using `nh_fm_mp', nogen
merge 1:1 year using `hnh_m_p', nogen
merge 1:1 year using `hnh_m_m', nogen
merge 1:1 year using `hnh_m_mp', nogen
merge 1:1 year using `hnh_f_m', nogen
merge 1:1 year using `hnh_f_p', nogen
merge 1:1 year using `hnh_f_mp', nogen
merge 1:1 year using `hnh_fm_m', nogen
merge 1:1 year using `hnh_fm_p', nogen
merge 1:1 year using `hnh_fm_mp', nogen

*********************
*** GRAPHING ******
*********************
local names  h_m_m h_m_mp h_f_m h_f_p h_f_mp h_fm_p h_fm_m h_fm_mp ///
	nh_m_p nh_m_m nh_m_mp nh_f_m nh_f_p nh_f_mp nh_fm_p nh_fm_m nh_fm_mp ///
	hnh_m_p hnh_m_m hnh_m_mp hnh_f_m hnh_f_p hnh_f_mp hnh_fm_p hnh_fm_m hnh_fm_mp
	
foreach i of local names {
		scalar a`i' = `i'[7] - h_m_p[7] 
		replace `i' = `i' - a`i'
		replace `i' = 1.3 if `i' < 1.3     // note !!!!
		replace `i' = 1.9 if `i' > 1.9    // note !!!!
		}

replace h_m_p = 1.3 if h_m_p < 1.3
replace h_m_p = 1.9 if h_m_p > 1.9
		
/* *calculate the slope */
gen trend = .
replace trend = hnh_fm_mp if year == 1973
replace trend = hnh_fm_mp if year == 1979
qui sum trend if year == 1973
scalar a = r(mean)
qui sum trend if year == 1979
scalar b = r(mean)
scalar slope = (a-b)/(1973-1979)
replace trend = trend[7] + slope* 12 if year == 1991
	
twoway ///
	(line h_m_m year, lcolor(gs15)) (line h_m_p year, lcolor(gs15)) ///
	(line h_m_mp year, lcolor(gs15))       ///
	(line h_f_p year, lcolor(gs15)) (line h_f_mp year, lcolor(gs15)) ///
	(line h_fm_m year, lcolor(gs10)) (line h_fm_p year, lcolor(gs10)) ///
	(line h_fm_mp year, lcolor(gs10)) ///
	(line nh_m_m year, lcolor(gs10)) (line nh_m_p year, lcolor(red) lwidth(thick)) ///
	(line nh_m_mp year, lcolor(gs1)) (line nh_f_m year, lcolor(gs10)) ///
	(line nh_f_p year, lcolor(gs10)) (line nh_f_mp year, lcolor(gs15)) ///
	(line nh_fm_m year, lcolor(gs15)) (line nh_fm_p year, lcolor(gs1)) ///
	(line nh_fm_mp year, lcolor(gs1)) ///
	(line hnh_m_m year, lcolor(gs10)) (line hnh_m_p year, lcolor(gs15)) ///
	(line hnh_m_mp year, lcolor(gs1)) (line hnh_f_m year, lcolor(gs15)) ///
	(line hnh_f_p year, lcolor(gs5)) (line hnh_f_mp year, lcolor(gs5)) ///
	(line hnh_fm_m year, lcolor(gs10)) (line hnh_fm_p year, lcolor(gs1)) ///
	(line hnh_fm_mp year, lcolor(blue) lwidth(thick)) ///
	(line trend year, lcolor(black) lwidth(thick) lpattern(dash)) ///
	, ///
	xlabel(1973 "1973" 1975 "75" 1977 "77" 1979 `""79" "Pre""' 1981 `""81" "Post""' 1983 "83" 1985 "85" 1987 "87" 1989 "89" 1991 "91") ///
	xline(1979, lcolor(black) lpattern(dash)) legend(off) subtitle("Log Hourly Wages in Miami, Subsamples, May + ORG") ///
	ytitle("") xtitle("")  plotregion(lwidth(none)) ///
	text(1.9 1990.8 "Panel D") ///
	yscale(range(1.3 1.9)) ylabel(1.3(.15)1.9) 

graph copy four, replace

grc1leg one two three four, imargin(vsmall) legendfrom(two)
graph export "jhr_fig8.png", replace

/*********************
*** SAMPLE SIZE ******
*********************
local vars nh_m_p_size nh_m_mp_size nh_m_m_size nh_fm_p_size nh_fm_mp_size nh_fm_m_size nh_f_p_size ///
	nh_f_mp_size nh_f_m_size hnh_m_p_size hnh_m_mp_size hnh_m_m_size hnh_fm_p_size hnh_fm_mp_size ///
	hnh_fm_m_size hnh_f_p_size hnh_f_mp_size hnh_f_m_size h_m_p_size h_m_mp_size h_m_m_size ///
	h_fm_p_size h_fm_mp_size h_fm_m_size h_f_p_size h_f_mp_size h_f_m_size
	
collapse `vars'
export excel matrix27_n_may, firstrow(variables)
